import { IPSSysEAIDataType } from './ipssys-eaidata-type';
import { IPSSysEAIDataTypeItem } from './ipssys-eaidata-type-item';
import { PSModelObjectImpl } from '../psmodel-object-impl';

export class PSSysEAIDataTypeImpl extends PSModelObjectImpl implements IPSSysEAIDataType {
  protected allpssyseaidatatypeitems: IPSSysEAIDataTypeItem[] | null = null;

  getAllPSSysEAIDataTypeItems(): IPSSysEAIDataTypeItem[] | null {
    if (this.allpssyseaidatatypeitems == null) {
      this.allpssyseaidatatypeitems = this.fillChildListModel(this.M.getAllPSSysEAIDataTypeItems, 'eai.IPSSysEAIDataTypeItem') as IPSSysEAIDataTypeItem[];
    }
    return this.allpssyseaidatatypeitems;
  }

  get allPSSysEAIDataTypeItems(): IPSSysEAIDataTypeItem[] | null {
    return this.getAllPSSysEAIDataTypeItems();
  }

  findPSSysEAIDataTypeItem(objKey: any): IPSSysEAIDataTypeItem | null {
    return this.getPSModel5('eai.IPSSysEAIDataTypeItem', this.getAllPSSysEAIDataTypeItems(), objKey) as IPSSysEAIDataTypeItem;
  }

  get codeName(): string {
    return this.M.codeName;
  }

  get dataTypeTag(): string {
    return this.M.dataTypeTag;
  }

  get dataTypeTag2(): string {
    return this.M.dataTypeTag2;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get maxStringLength(): number {
    return this.M.maxStringLength;
  }

  get maxValueString(): string {
    return this.M.maxValueString;
  }

  get memo(): string {
    return this.M.memo;
  }

  get minStringLength(): number {
    return this.M.minStringLength;
  }

  get minValueString(): string {
    return this.M.minValueString;
  }

  get name(): string {
    return this.M.name;
  }

  get pattern(): string {
    return this.M.pattern;
  }

  get precision(): number {
    return this.M.precision != null ? this.M.precision : 0;
  }

  get stdDataType(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 {
    return this.M.stdDataType;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get enableEnum(): boolean {
    return this.M.enableEnum;
  }

  get includeMaxValue(): boolean {
    return this.M.includeMaxValue != null ? this.M.includeMaxValue : false;
  }

  get includeMinValue(): boolean {
    return this.M.includeMinValue != null ? this.M.includeMinValue : false;
  }

  get cls(): string {
    return 'PSSysEAIDataTypeImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'eai.IPSEAIDataType' || cls == 'eai.IPSSysEAIDataType') return true;
    return super.instanceof(cls);
  }
}
